<title>企业信息-增加</title>
<!-- /section:settings.box -->
<div class="row">
	<div class="col-xs-12 firm_add">
		<form class="form-horizontal registerform">
			<div class="space-4"></div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">企业名称：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_firm_name"
							id="hx_firm_name" value="" datatype="*" nullmsg="请输入企业名称"
							placeholder="请输入企业名称">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">法定代表人：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge"
							name="hx_legal_representative" id="hx_legal_representative"
							value="" datatype="*" nullmsg="请输入负责人" placeholder="请输入负责人">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">公司电话：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_phone"
							id="hx_phone" value="" datatype="*" nullmsg="请输入电话"
							placeholder="请输入电话">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">注册资本（万元）：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_capital"
							id="hx_capital" value="" datatype="*" nullmsg="请输入注册资本"
							placeholder="请输入注册资本">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">注册地址：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_address"
							id="hx_address" value="" datatype="*" nullmsg="请输入注册地址"
							placeholder="请输入注册地址">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">注册日期：</label>
				<div data-link-field="dtp_input1" data-date-format="yyyy-mm-dd"
					class="input-group date form_datetime col-sm-2 fl">
					<input type="text" id="hx_register_time" size="16"
						class="form-control col-sm-12" placeholder="请选择注册日期"> <span
						class="input-group-addon"> <span
						class="glyphicon glyphicon-remove"> </span></span> <span
						class="input-group-addon"> <span class="glyphicon glyphicon-th"> </span></span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">资质等级：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_level"
							id="hx_level" value="" datatype="*" nullmsg="请输入资质等级"
							placeholder="请输入资质等级">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">资质授予时间：</label>
				<div data-link-field="dtp_input1" data-date-format="yyyy-mm-dd"
					class="input-group date form_datetime col-sm-2 fl">
					<input type="text" id="hx_fld2" size="16"
						class="form-control col-sm-12" placeholder="请选择资质授予日期"> <span
						class="input-group-addon"> <span
						class="glyphicon glyphicon-remove"> </span></span> <span
						class="input-group-addon"> <span class="glyphicon glyphicon-th"> </span></span>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">技术负责人：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_name2"
							id="hx_name2" value="" datatype="*" nullmsg="请输入技术负责人"
							placeholder="请输入技术负责人">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">法人经营负责人：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_name3"
							id="hx_name3" value="" datatype="*" nullmsg="请输入法人"
							placeholder="请输入法人">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">财务负责人：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<input type="text" class="input-xlarge" name="hx_name4"
							id="hx_name4" value="" datatype="*" nullmsg="请输入财务负责人"
							placeholder="请输入财务负责人">
					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right"
					for="form-field-name">备注：</label>
				<div class="input-group col-sm-9">
					<div class="in_txt">
						<textarea class="input-xlarge" datatype="*" nullmsg="请输入备注"
							id="hx_remark" placeholder="请输入备注" style="min-height: 80px;"></textarea>

					</div>
					<div class="tishi">
						<div class="Validform_checktip"></div>
					</div>
				</div>
			</div>
			<div class="space-4"></div>
			<div class="clearfix form-actions">
				<div class="col-md-offset-3 col-md-9">
					<button class="btn btn-info save" type="button" id="btnSubmit">
						<i class="ace-icon fa fa-check bigger-110"> </i>增加
					</button>
					&nbsp; &nbsp;
					<button class="btn" type="button">
						<i class="ace-icon glyphicon glyphicon-remove bigger-110"> </i>取消
					</button>
				</div>
			</div>
		</form>
	</div>
	<!-- PAGE CONTENT ENDS -->
	<!-- /.col -->
</div>
<script type="text/javascript">var scripts = [null, "/datetimepicker/js/bootstrap-datetimepicker.min.js",
	"/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js", null
];
var $scope = $(".firm_add");
$('.page-content-area').ace_ajax('loadScripts', scripts, function() {
	$('.js_nav_a li.open').removeClass('open')
	$('.js_nav_a li.active').removeClass('active')
	var vform = $(".registerform").Validform({
		tiptype: 2
	});
	$('.form_datetime').datetimepicker({
		minView: "month", //选择日期后，不会再跳转去选择时分秒
		format: "yyyy-mm-dd", //选择日期后，文本框显示的日期格式
		language: 'zh-CN', //汉化
		autoclose: true //选择日期后自动关闭
	});
	$("#btnSubmit").click(function() {
		if (!vform.check(false)) {
			return;
		}
		var firm_name = $("#hx_firm_name", $scope).val();
		var legal_representative = $("#hx_legal_representative", $scope).val();
		var phone = $("#hx_phone", $scope).val();
		var capital = $("#hx_capital", $scope).val();
		var level = $("#hx_level", $scope).val();
		var register_time = $("#hx_register_time", $scope).val();
		var address = $("#hx_address", $scope).val();
		var level = $("#hx_level", $scope).val();
		var fld2 = $("#hx_fld2", $scope).val();
		var name2 = $("#hx_name2", $scope).val();
		var name3 = $("#hx_name3", $scope).val();
		var name4 = $("#hx_name4", $scope).val();
		var remark = $("#hx_remark", $scope).val();
		$.post('/enterprise/Ajax_enterprise_add', {
			'firm_name': firm_name,
			'legal_representative': legal_representative,
			'phone': phone,
			'level': level,
			'register_time': register_time,
			'address': address,
			'level': level,
			'fld2': fld2,
			'name2': name2,
			'name3': name3,
			'name4': name4,
			'remark': remark,
			'capital':capital
		}, function(data) {
			if (200 === data.status) {
				message_box.show(data.data);
				gDialog.fClose();
				if (typeof(pageObj) != "undefined") {
					if (data.page < pageObj.get_page_count()) {
						pageObj.dec_page_count(); //-1
						if (pageObj.get_page_index() > pageObj.get_page_count()) {
							pageObj.go_page(pageObj.get_page_count());
						} else {
							pageObj.cur_page();
						}
					} else {
						pageObj.cur_page();
					}
				}
			} else {
				message_box.show(data.data);
			}
		}, 'json');
	});
})</script>
